Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement schema comparison logic #50400

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

subodh1810
Copy link
Contributor

@subodh1810 subodh1810 commented Dec 23, 2024

@subodh1810 subodh1810 self-assigned this Dec 23, 2024
@subodh1810 subodh1810 requested a review from a team as a code owner December 23, 2024 15:25
Copy link

vercel bot commented Dec 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 6:57pm

@subodh1810
Copy link
Contributor Author

subodh1810 commented Dec 23, 2024

/format-fix

Format-fix job started... Check job output.

✅ Changes applied successfully. (fe20d62)

* - Columns that no longer exist in the incoming schema (i.e., removed).
* - Columns that changed from required to optional.
*/
class IcebergTypesComparator {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering: which of these is better

  • diff existing vs incoming iceberg schema (your current pr)
  • diff existing iceberg schema vs incoming AirbyteType (probably dumb)
  • convert existing iceberg schema to AirbyteType; diff existing vs incoming AirbyteType (ie. sharable diff logic)

I think diffing iceberg schemas (i.e. keep your current approach) is better? b/c (a) iceberg types don't perfectly align with airbyte types, and (b) iceberg is weird b/c it has recursive schemas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! I did try to make it generic but realised it's not worth trying to solve a future problem when we dont know enough about it. I think for now this being iceberg specific is fair enough and we can re-visit it once we have more understandings of how this can be generalised and made better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants